package clientGui;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;

public class ChatCard extends javax.swing.JPanel
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5503857231852515203L;
	private ChatPanel chatPanel;
	private UsersPanel usersPanel;
	public ChatPanel getChatPanel()
	{
		return chatPanel;
	}
	
	public ChatCard()
	{
		
		chatPanel = new ChatPanel();
		usersPanel = new UsersPanel();
		
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
					.addComponent(chatPanel, GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(usersPanel, GroupLayout.PREFERRED_SIZE, 179, GroupLayout.PREFERRED_SIZE))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addComponent(chatPanel, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
				.addComponent(usersPanel, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
		);
		setLayout(groupLayout);
		
	}

	public UsersPanel getUsersPanel()
	{
		return usersPanel;
	}

}
